package com.hgw.Demo04_BuilderPattern.builder;

/**
 * Data time:2021/12/12 21:07
 * StudentID:2019112118
 * Author:hgw
 * Description: 指挥者
 */
public class Director {

    // 声明builder类型的变量
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    // 组装自行车的功能
    public Bike construct(){
        builder.buildFrame();
        builder.buildSeat();
        return builder.createBike();
    }
}
